package com.idp.web.test.service;

import com.idp.web.test.entity.OrderItem;
import com.idp.web.test.entity.Ordert;
import java.util.List;

import com.idp.common.persistence.Page;
import com.idp.ebay.domain.EBayInfo;

/**
 * 
 * 123123service接口
 * 
 * <pre>
 * 	历史记录：
 * 	2017-06-02 Amber
 * 	新建文件
 * </pre>
 * 
 * @author
 * 
 * 		<pre>
 * SD
 * 	Amber
 * PG
 *	Amber
 * UT
 *
 * MA
 *         </pre>
 * 
 * @version $Rev$
 *
 *          <p/>
 *          $Id$
 *
 */
public interface OrdertService {

	/**
	 * 
	 * <pre>
	 * 	2017-06-02 Amber
	 * 	分页查询
	 * </pre>
	 * 
	 * @param ordert
	 * @param page
	 * @return
	 */
	public Page<Ordert> findByPage(Ordert ordert, Page<Ordert> page);

	public Ordert findByCode(String code);

	public List<OrderItem> findItems(int orderid);

	/**
	 * 
	 * <pre>
	 * 	2017-06-02 Amber
	 * 	查询
	 * </pre>
	 * 
	 * @param ordert
	 * @return
	 */
	public List<Ordert> findBySearch(Ordert ordert);

	/**
	 * 
	 * <pre>
	 * 	2017-06-02 Amber
	 * 	通过ID查询
	 * </pre>
	 * 
	 * @param Ordert
	 * @return
	 */
	public Ordert getById(Integer id);

	/**
	 * 
	 * <pre>
	 * 	2017-06-02 Amber
	 * 	新增
	 * </pre>
	 * 
	 * @param ordert
	 */
	public void add(Ordert ordert);

	/**
	 * 
	 * <pre>
	 * 	2017-06-02 Amber
	 * 	修改
	 * </pre>
	 * 
	 * @param ordert
	 */
	public void update(Ordert ordert);

	/**
	 * 
	 * <pre>
	 * 	2017-06-02 Amber
	 * 	删除
	 * </pre>
	 * 
	 * @param id
	 */
	public void delete(Integer id);

	public Integer synchronization(List<EBayInfo> infos, Integer platformId,Integer accountid);

	public Page<Ordert> getByPlatformId(Integer platformId, Page<Ordert> page);

	public List<Ordert> getByDate(String startDate, String endDate);
	
	public List<Ordert> getByDateAll(String startDate, String endDate);

	public List<Ordert> findByStatus(String startDate, String endDate, Integer status);

	public List<Ordert> getByDateUtil(String startDate, String endDate, Integer platformId);

	public List<Ordert> findByStatusUtil(String startDate, String endDate, Integer status, Integer platformId);

	void updateNotNull(Ordert ordert);
}
